import { IFeidaoAiNodejsComponent } from '@feidao-factory/atom-nodejs/interfaces';
import javadsd from '@feidao-factory/atom-nodejs/msg/javadsd';

import { systemid, refsystemid } from '../../atom/config';

export default async function na007(fd: IFeidaoAiNodejsComponent, ...args: any[]) {
	try {
		const ret = await javadsd(fd.data.actionid, fd.data.sessionid, fd.data.spaceid, systemid, refsystemid, 'by_jxcdsd0000021', {
			param: {
				start_time: 1547827200236,
				end_time: 1548518340236,
				retailer_store_no: 'MD000161',
				salesman_no: 'YG000271',
				doccode: ''
			},
			paging: {
				index: 1,
				size: 10
			},
			sort: {}
		});
		return {
			flag: '调用正确的javadsd服务',
			msg: JSON.stringify(ret)
		};
	} catch (err) {
		return {
			flag: '调用正确的javadsd服务',
			msg: (err as Error).toString()
		};
	}
}
